$OpenBSD: patch-system-install_mk,v 1.4 2015/07/18 20:25:15 jasper Exp $
--- system-install.mk.orig	Tue Jun 16 23:08:34 2015
+++ system-install.mk	Sat Jul 18 14:16:44 2015
@@ -5,7 +5,7 @@ cappname=$(shell echo $(appname) | tr '[:lower:]' '[:u
 appclient=$(APPCLIENT)$(APPMODIFIER)$(BIN_SUFFIX)
 appserver=$(APPSERVER)$(APPMODIFIER)$(BIN_SUFFIX)
 
-prefix=/usr/local
+prefix=$(TRUEPREFIX)
 games=
 gamesbin=/bin
 bindir=$(DESTDIR)$(prefix)/bin
@@ -13,7 +13,8 @@ gamesbindir=$(DESTDIR)$(prefix)$(gamesbin)
 libexecdir=$(DESTDIR)$(prefix)/lib$(games)
 datadir=$(DESTDIR)$(prefix)/share$(games)
 docdir=$(DESTDIR)$(prefix)/share/doc
-mandir=$(DESTDIR)$(prefix)/share/man
+examplesdir=$(DESTDIR)$(prefix)/share/examples
+mandir=$(DESTDIR)$(prefix)/man
 menudir=$(DESTDIR)$(prefix)/share/applications
 icondir=$(DESTDIR)$(prefix)/share/icons/hicolor
 pixmapdir=$(DESTDIR)$(prefix)/share/pixmaps
@@ -93,16 +94,11 @@ system-install-server: server
 system-install-common:
 	$(MKDIR) $(libexecdir)/$(appname)
 	$(MKDIR) $(datadir)/$(appname)
-	$(MKDIR) $(datadir)/$(appname)/doc
 	$(MKDIR) $(docdir)/$(appname)
 	cp -r ../config $(datadir)/$(appname)/config
 	ln -s $(patsubst $(DESTDIR)%,%,$(datadir))/$(appname)/config \
 		$(libexecdir)/$(appname)/config
-	install -m644 ../doc/guidelines.txt $(datadir)/$(appname)/doc
-	ln -s $(patsubst $(DESTDIR)%,%,$(datadir))/$(appname)/doc \
-		$(libexecdir)/$(appname)/doc
-	ln -s $(patsubst $(DESTDIR)%,%,$(datadir))/$(appname)/doc/guidelines.txt \
-		$(docdir)/$(appname)/guidelines.txt
+	install -m644 ../doc/guidelines.txt $(docdir)/$(appname)
 
 system-install-data:
 	$(MKDIR) $(datadir)/$(appname)
@@ -119,16 +115,16 @@ system-install-docs: $(MANPAGES)
 		-e 's,@DOCDIR@,$(patsubst $(DESTDIR)%,%,$(docdir)),g' \
 		-e 's,@APPNAME@,$(appname),g' \
 		-e 's,@CAPPNAME@,$(cappname),g' \
-		../doc/man/$(appsrcname).6.am | \
-		gzip -9 -n -c > $(mandir)/man6/$(appname).6.gz
+		../doc/man/$(appsrcname).6.am \
+		> $(mandir)/man6/$(appname).6
 	sed -e 's,@LIBEXECDIR@,$(patsubst $(DESTDIR)%,%,$(libexecdir)),g' \
 		-e 's,@DATADIR@,$(patsubst $(DESTDIR)%,%,$(datadir)),g' \
 		-e 's,@DOCDIR@,$(patsubst $(DESTDIR)%,%,$(docdir)),g' \
 		-e 's,@APPNAME@,$(appname),g' \
 		-e 's,@CAPPNAME@,$(cappname),g' \
-		../doc/man/$(appsrcname)-server.6.am | \
-		gzip -9 -n -c > $(mandir)/man6/$(appname)-server.6.gz
-	cp -r ../doc/examples $(docdir)/$(appname)/examples
+		../doc/man/$(appsrcname)-server.6.am \
+		> $(mandir)/man6/$(appname)-server.6
+	cp -r ../doc/examples $(examplesdir)/$(appname)
 
 system-install-menus: icons
 	$(MKDIR) $(menudir)
@@ -170,52 +166,51 @@ system-install-cube2font: cube2font system-install-cub
 
 system-install-cube2font-docs: ../doc/man/cube2font.1
 	$(MKDIR) $(mandir)/man1
-	gzip -9 -n -c < ../doc/man/cube2font.1 \
-		> $(mandir)/man1/cube2font.1.gz
+	install -m644 ../doc/man/cube2font.1 $(mandir)/man1/cube2font.1
 
 system-install: system-install-client system-install-server system-install-common system-install-data system-install-docs system-install-menus
 
 system-uninstall-common:
 	rm -rf $(datadir)/$(appname)/config
-	@rm -fv $(libexecdir)/$(appname)/config
+	@rm -f $(libexecdir)/$(appname)/config
 	rm -rf $(datadir)/$(appname)/doc
-	@rm -fv $(libexecdir)/$(appname)/doc
-	@rm -fv $(docdir)/$(appname)/guidelines.txt
+	@rm -f $(libexecdir)/$(appname)/doc
+	@rm -f $(docdir)/$(appname)/guidelines.txt
 
 system-uninstall-client:
-	@rm -fv $(libexecdir)/$(appname)/$(appname)
-	@rm -fv $(libexecdir)/$(appname)/data
-	@rm -fv $(gamesbindir)/$(appname)
+	@rm -f $(libexecdir)/$(appname)/$(appname)
+	@rm -f $(libexecdir)/$(appname)/data
+	@rm -f $(gamesbindir)/$(appname)
 
 system-uninstall-server:
-	@rm -fv $(libexecdir)/$(appname)/$(appname)-server
-	@rm -fv $(gamesbindir)/$(appname)-server
+	@rm -f $(libexecdir)/$(appname)/$(appname)-server
+	@rm -f $(gamesbindir)/$(appname)-server
 
 system-uninstall-data:
 	rm -rf $(datadir)/$(appname)/data
 
 system-uninstall-docs:
-	@rm -rfv $(docdir)/$(appname)/examples
-	@rm -fv $(mandir)/man6/$(appname).6.gz
-	@rm -fv $(mandir)/man6/$(appname)-server.6.gz
+	@rm -rf $(docdir)/$(appname)/examples
+	@rm -f $(mandir)/man6/$(appname).6
+	@rm -f $(mandir)/man6/$(appname)-server.6
 
 system-uninstall-menus:
-	@rm -fv $(menudir)/$(appname).desktop
-	@rm -fv $(appdatadir)/$(appname).appdata.xml
-	@rm -fv $(icondir)/16x16/apps/$(appname).png
-	@rm -fv $(icondir)/32x32/apps/$(appname).png
-	@rm -fv $(icondir)/48x48/apps/$(appname).png
-	@rm -fv $(icondir)/64x64/apps/$(appname).png
-	@rm -fv $(icondir)/128x128/apps/$(appname).png
-	@rm -fv $(pixmapdir)/$(appname).xpm
+	@rm -f $(menudir)/$(appname).desktop
+	@rm -f $(appdatadir)/$(appname).appdata.xml
+	@rm -f $(icondir)/16x16/apps/$(appname).png
+	@rm -f $(icondir)/32x32/apps/$(appname).png
+	@rm -f $(icondir)/48x48/apps/$(appname).png
+	@rm -f $(icondir)/64x64/apps/$(appname).png
+	@rm -f $(icondir)/128x128/apps/$(appname).png
+	@rm -f $(pixmapdir)/$(appname).xpm
 
 system-uninstall: system-uninstall-client system-uninstall-server system-uninstall-common system-uninstall-data system-uninstall-docs system-uninstall-menus
-	-@rmdir -v $(libexecdir)/$(appname)
-	-@rmdir -v $(datadir)/$(appname)
-	-@rmdir -v $(docdir)/$(appname)
+	-@rmdir $(libexecdir)/$(appname)
+	-@rmdir $(datadir)/$(appname)
+	-@rmdir $(docdir)/$(appname)
 
 system-uninstall-cube2font-docs:
-	@rm -fv $(mandir)/man1/cube2font.1.gz
+	@rm -f $(mandir)/man1/cube2font.1
 
 system-uninstall-cube2font: system-uninstall-cube2font-docs
-	@rm -fv $(bindir)/bin/cube2font
+	@rm -f $(bindir)/bin/cube2font
